package com.lhm.service;


import com.lhm.entity.Hot;
import com.lhm.mapper.HotMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class HotServiceImpl implements  HotService {
    @Autowired
    HotMapper hotMapper;

    @Override
    public int addHot(Hot hot) {
        int i = hotMapper.addHot(hot);
        return i;
    }

    @Override
    public List<Hot> findAll() {
        return hotMapper.findAll();
    }

    @Override
    public int delete(Integer id) {
        int i = hotMapper.delete(id);
        return i;
    }

    @Override
    public Hot findById(Integer id) {
        return hotMapper.findById(id);
    }

    @Override
    public List<Hot> findByType(int n1, int n2) {
        List<Hot> lst = hotMapper.findByType(n1, n2);
        return lst;
    }
}
